/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.ipccenter.toster.jpa;

import java.io.Serializable;
import java.math.BigInteger;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author 7
 */
@Embeddable
public class JPATestPK implements Serializable {
    
    @Column(name = "SESSION_ID")
    private BigInteger sessionId;
   
    @Column(name = "TC_ID")
    private BigInteger tcId;

    public JPATestPK() {
    }

    public JPATestPK(BigInteger sessionId, BigInteger tcId) {
        this.sessionId = sessionId;
        this.tcId = tcId;
    }

    public BigInteger getSessionId() {
        return sessionId;
    }

    public void setSessionId(BigInteger sessionId) {
        this.sessionId = sessionId;
    }

    public BigInteger getTcId() {
        return tcId;
    }

    public void setTcId(BigInteger tcId) {
        this.tcId = tcId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (sessionId != null ? sessionId.hashCode() : 0);
        hash += (tcId != null ? tcId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof JPATestPK)) {
            return false;
        }
        JPATestPK other = (JPATestPK) object;
        if ((this.sessionId == null && other.sessionId != null) || (this.sessionId != null && !this.sessionId.equals(other.sessionId))) {
            return false;
        }
        if ((this.tcId == null && other.tcId != null) || (this.tcId != null && !this.tcId.equals(other.tcId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "edu.ipccenter.toster.jpa.TestsPK[ sessionId=" + sessionId + ", tcId=" + tcId + " ]";
    }
    
}
